FROM alpine:3.16
#dockerfile.kubectl.sh

COPY dockerfile.kubectl.sh /etc/dockerfile/

# ENV KUBE_VERSION=1.22.12
# ENV KUBE_VERSION=1.24.16
# ENV KUBE_VERSION=1.26.15
# ENV KUBE_VERSION=1.28.15
ENV KUBE_VERSION=1.30.14

RUN apk add --no-cache ca-certificates bash curl jq \
 && wget https://dl.k8s.io/v${KUBE_VERSION}/bin/linux/amd64/kubectl -O /usr/local/bin/kubectl \
 && chmod +x /usr/local/bin/kubectl

WORKDIR /root

CMD ["kubectl"]

#https://www.downloadkubernetes.com/

# docker build --no-cache -t kubectl:1.30.14 -f dockerfile.kubectl.sh .

# registry.aliyuncs.com/elvin/kubectl:1.30.14
